Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split off KeyboardHandle::filter callback to separate method #862

Merged
merged 6 commits into from
Sep 19, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 13, 2024

Requires Smithay/smithay#1533. If the input_intercept changes there are controversial, this could instead use a a few more arguments, or something involving input_intercept/input_forward instead of input (but that's probably not simpler).

#465 will require some additional logic here to filter out the key grabs. I don't really want this to get more complicated so a wanted to try splitting things up first. Just moving the callback to a method is a start, though more could be improved.

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sensible to me

Not sure if this is actually used, and if so the code may need more
testing, but this definitely is more correct, at least.
This saves 7 levels of indentation, which seems like a plus.

The `InputEvent::Keyboard` branch of the `match` now fits clearly in one
screen. The `filter_keyboard_input()` method could probably still be
broken up more.

The method needs a few arguments, but it seems nice to make what it
depends on explicit.
@ids1024 ids1024 marked this pull request as ready for review September 18, 2024 20:15
Not supressing key repetition in backends seems like it was a bug, and
should be fixed as of Smithay/smithay#1535.

So an argument for this should be unnecessary now.
@ids1024
Copy link
Member Author

ids1024 commented Sep 18, 2024

Updated now that Smithay changes are merged, and added a commit removing the needs_key_repetition argument which should be unneeded with Smithay/smithay#1535.

@Drakulix Drakulix merged commit d7ca032 into master Sep 19, 2024
7 checks passed
@Drakulix Drakulix deleted the keyboard-input branch September 19, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants